"""
进度跟踪代理模块
本模块包含进度跟踪代理，负责生成综合的项目进度报告和状态摘要
该代理专门用于项目状态监控和进度分析
"""

from google.adk.agents import LlmAgent
import os
from google.adk.models.lite_llm import LiteLlm

# API密钥配置
DEFAULT_DASHSCOPE_API_KEY = "sk-f227634bb56*************************232"  # 请替换为您的实际密钥
DASHSCOPE_API_KEY = os.environ.get("DASHSCOPE_API_KEY", DEFAULT_DASHSCOPE_API_KEY)

# 进度跟踪代理 - 专门负责项目进度监控和报告生成
# 该代理生成包含项目状态、任务进度、潜在问题和下一步行动的综合报告
progress_tracking_agent = LlmAgent(
    name="ProgressTrackingAgent",  # 代理名称：进度跟踪代理
    model=LiteLlm(
                model="openai/qwen-turbo",  # 使用通义千问Turbo模型
                api_key=DASHSCOPE_API_KEY,
                api_base="https://dashscope.aliyuncs.com/compatible-mode/v1"
    ),
    instruction="""
    You are a progress tracking specialist. When asked to provide a project summary, 
    generate a realistic progress report for the project tasks.
    
    Your report should include:
    1. Overall project status
    2. Individual task progress (with realistic percentage completion)
    3. Any potential blockers or challenges
    4. Next steps and timeline
    5. Team performance insights
    
    Format your response as a comprehensive but concise project status report.
    
    For simulation purposes, assume tasks are in various stages of completion:
    - Some tasks may be 60-80% complete
    - Others may be just starting (10-20% complete)  
    - Include realistic challenges teams might face
    
    Always provide a professional, informative summary that a project manager would find useful.
    """,
    description="Generates comprehensive project progress reports and status summaries."  # 代理描述：生成综合的项目进度报告和状态摘要
)
